package com.xixi.service.impl;

import com.xixi.mapper.StatisticsMapper;
import com.xixi.pojo.vo.statistics.order.OrderStatsVO;
import com.xixi.pojo.vo.statistics.order.OrderStatusVO;
import com.xixi.pojo.vo.statistics.order.OrderTrendVO;
import com.xixi.pojo.vo.statistics.personal.PersonalTradingAnalysisVO;
import com.xixi.pojo.vo.statistics.personal.PersonalTradingTrendVO;
import com.xixi.pojo.vo.statistics.product.ProductCategoryVO;
import com.xixi.pojo.vo.statistics.product.ProductStatsVO;
import com.xixi.pojo.vo.statistics.product.ProductStatusVO;
import com.xixi.pojo.vo.statistics.user.UserGenderVO;
import com.xixi.pojo.vo.statistics.user.UserRegisterVO;
import com.xixi.pojo.vo.statistics.user.UserStatsVO;
import com.xixi.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class StatisticsServiceImpl implements StatisticsService {
    @Autowired
    private StatisticsMapper statisticsMapper;
    @Override
    public OrderStatsVO getOrderStats() {
        OrderStatsVO orderStatsVO = statisticsMapper.getOrderStats();
        return orderStatsVO;
    }

    @Override
    public List<OrderTrendVO> getOrderTrend() {
       List<OrderTrendVO> orderTrendVOList = statisticsMapper.getOrderTrend();
       return orderTrendVOList;
    }

    @Override
    public List<OrderStatusVO> getOrderStatus() {
        List<OrderStatusVO> orderStatus = statisticsMapper.getOrderStatus();
        return orderStatus;
    }

    @Override
    public List<ProductCategoryVO> getProductCategory() {
        List<ProductCategoryVO> category = statisticsMapper.getProductCategory();
        return category;
    }

    @Override
    public ProductStatsVO getProductStats() {
        ProductStatsVO stats = statisticsMapper.getProductStats();
        return stats;
    }

    @Override
    public List<ProductStatusVO> getProductStatus() {
        List<ProductStatusVO> status = statisticsMapper.getProductStatus();
        return status;
    }

    @Override
    public UserStatsVO getUserStats() {
        UserStatsVO stats = statisticsMapper.getUserStats();
        return stats;
    }

    @Override
    public List<UserGenderVO> getUserGender() {
        List<UserGenderVO> gender = statisticsMapper.getUserGender();
        return gender;
    }

    @Override
    public List<UserRegisterVO> getUserRegister() {
        List<UserRegisterVO> register = statisticsMapper.getUserRegister();
        return register;
    }

    @Override
    public ProductStatsVO getPersonalProductStats(Integer userId) {
        ProductStatsVO stats = statisticsMapper.getPersonalProductStats(userId);
        return stats;
    }

    @Override
    public List<ProductCategoryVO> getPersonalProductCategory(Integer userId) {
        List<ProductCategoryVO> category = statisticsMapper.getPersonalProductCategory(userId);
        return category;
    }

    @Override
    public List<ProductStatusVO> getPersonalProductStatus(Integer userId) {
        List<ProductStatusVO> status = statisticsMapper.getPersonalProductStatus(userId);
        return status;
    }

    @Override
    public OrderStatsVO getPersonalOrderStats(Integer userId) {
        OrderStatsVO stats = statisticsMapper.getPersonalOrderStats(userId);
        return stats;
    }

    @Override
    public List<OrderStatusVO> getPersonalOrderStatus(Integer userId) {
       List<OrderStatusVO> status = statisticsMapper.getPersonalOrderStatus(userId);
       return status;
    }

    @Override
    public List<OrderTrendVO> getPersonalOrderTrend(Integer userId) {
        List<OrderTrendVO> orderTrendVOList = statisticsMapper.getPersonalOrderTrend(userId);
        return orderTrendVOList;
    }

    @Override
    public List<PersonalTradingTrendVO> getPersonalTradingTrend(Integer userId) {
        List<PersonalTradingTrendVO> trendVOList = statisticsMapper.getPersonalTradingTrend(userId);
        return trendVOList;
    }

    @Override
    public PersonalTradingAnalysisVO getPersonalTradingAnalysis(Integer userId) {
        PersonalTradingAnalysisVO analysisVO = statisticsMapper.getPersonalTradingAnalysis(userId);
        return analysisVO;
    }
}
